/**
 * Copyright (C) 2018 - 2020 https://github.com/LeeYan9
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.entity;

import lombok.Data;

import javax.persistence.*;
import java.math.BigInteger;

/**
 * @author Lee
 * Create Class on 2018/11/29
 * @com.bifrost.entity
 * @wechat-mall
 */
@Data
@Entity
@Table(name = "EXT_MEMBER_BONUSPOINTS" , indexes = {
        @Index(name = "UNIQUE_MERCHANT_ID_PHONE" ,columnList = "MERCHANT_ID,PHONE" , unique = true )
})
public class ExtMemberBonusPoints {

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    private Long id;

    @Column(name = "PHONE" , length = 20)
    private String phone ;

    @Column(name = "NICKNAME", length = 100)
    private String nickName;

    @Column(name = "EMAIL" , length = 100)
    private String email;

    @Column(name = "ADDRESS")
    private String address;

    @Column(name = "CRATE_DATE" , length = 50)
    private String crateDate;

    @Column(name = "MERCHANT_ID")
    private Long merchantId;

    @Column(name = "BONUS_POINTS")
    private BigInteger bonusPoints;

}
